#ifndef _MATRIX_
#define _MATRIX_

#include <GL/glut.h>

/* This creates a matrix and allows different
 * transformations to take place.
 * Its use is to be a superclass to any class
 * that requires a matrix to move itself around.
 */
class Matrix {
protected:
	//Actual matrix
	GLfloat m[16];

public:
	//Constructor (to identity)
	Matrix();

	/* Translate (The "Add" version adds the translations
	 * to the matrix, the "Set" version replaces any older value)
	 */
	void translateAdd(float, float, float);
	void translateSet(float, float, float);

	//Get location
	GLfloat x() {return m[12];}
	GLfloat y() {return m[13];}
	GLfloat z() {return m[14];}

	// Scale
	void scaleAdd(float, float, float);
	void scaleSet(float, float, float);

	//Rotate (doesn't work right yet :( )
	void rotateAdd(float, float, float);
	void rotateSet(float, float, float);

	void push_apply();
};

#endif
